From: Olaf Hering Date: Fri, 10 Jun 2011 08:47:19 +0000 (+0200) Subject: xenpaging: catch xc_mem_paging_resume errors X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10140 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=e9f6c46e23434ed7155ce637cc90b5ef21dac015;p=xen.git xenpaging: catch xc_mem_paging_resume errors In the unlikely event that xc_mem_paging_resume() fails, do not overwrite the error with the return value from xc_evtchn_notify() Signed-off-by: Olaf Hering Committed-by: Ian Jackson --- diff --git a/tools/xenpaging/xenpaging.c b/tools/xenpaging/xenpaging.c index 194af53b33..6ede98768f 100644 --- a/tools/xenpaging/xenpaging.c +++ b/tools/xenpaging/xenpaging.c @@ -442,8 +442,9 @@ static int xenpaging_resume_page(xenpaging_t *paging, mem_event_response_t *rsp, /* Tell Xen page is ready */ ret = xc_mem_paging_resume(paging->xc_handle, paging->mem_event.domain_id, rsp->gfn); - ret = xc_evtchn_notify(paging->mem_event.xce_handle, - paging->mem_event.port); + if ( ret == 0 ) + ret = xc_evtchn_notify(paging->mem_event.xce_handle, + paging->mem_event.port); out: return ret;